/**
 * SPDX-FileCopyrightText: 2023-2025 Sangfor Technologies Inc.
 * SPDX-License-Identifier: Mulan PSL v2
 */
/**
 * Created by ued on 2015/10/13.
 */

function getStorage (args: string): string | null {
    return localStorage.getItem(args);
}

function setStorage (key: string, value: string): void {
    localStorage.setItem(key, value);
}


function removeStorage (key: string): void {
    return localStorage.removeItem(key);
}

function clear (): void {
    return localStorage.clear();
}

function getLength (): number {
    return localStorage.length;
}

function getKey (index: number): string | null {
    return localStorage.key(index);
}

export {
    getStorage,
    setStorage,
    removeStorage,
    clear,

    getKey,
    getLength
};
